package com.coolwen.spring.ioc.annotation;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author CoolWen
 * @version 2020-03-12 9:09
 */
public class TestAn {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("beansan.xml");
        Knight knight = ctx.getBean("knight", Knight.class);
        knight.setUsername("老王");
        knight.fight();
    }
}
